package com.etc.service.impl;

import com.etc.Dao.ScoreDao;
import com.etc.entity.Score;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

public class Scoreservice  implements ScoreDao {


    private SqlSessionFactory sqlSessionFactory;

    public Scoreservice(SqlSessionFactory sqlSessionFactory) {
        this.sqlSessionFactory = sqlSessionFactory;
    }




    @Override
    public List<Score> dantiao() {
    SqlSession sqlSession =null;
         sqlSession = sqlSessionFactory.openSession();
        List<Score> dantiao = sqlSession.selectList("dantiao");
        return  dantiao;

    }
}
